<template>
  <z-auto-complete
    v-model:value="value"
    :options="options"
    style="width: 200px"
    placeholder="input here"
    :filter-option="filterOption"
  />
</template>

<script>
import { defineComponent, ref } from 'vue'

export default defineComponent({
  setup() {
    const filterOption = (input, option) => {
      return option.value.toUpperCase().indexOf(input.toUpperCase()) >= 0
    }
    return {
      value: ref(''),
      options: ref([{
        value: 'Burns Bay Road'
      }, {
        value: 'Downing Street'
      }, {
        value: 'Wall Street'
      }]),
      filterOption,
    }
  }
})
</script>
